<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var i = 1;
        while (i<5) {
            console.log('循环执行了')
            i--
        }

        // do {
        //     console.log('循环执行了')
        //     i++
        // } while (i < 5)

        // for(var i =0 ;i<5;i++){
        //         console.log(循环执行了)
        // }

        var arr = ['tom','bob','coc','dod','eoe']

        for (let i = 0; i < arr.length; i++) {
           for (let j = 0; j < array.length; j++) {
               console.log('i'+i)
               console.log('j'+j)
           }
        }
    </script>
</body>

</html>